/*****************************************************************
 *@Copyright all rights reserved ? 2014 Yuga
 *@author YUga studio
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webbase.modules.invoicing.entity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.oplink.webbase.common.persistence.DataEntity;
import com.oplink.webbase.modules.sys.entity.User;

/**
 * 告警Entity
 * 
 * @author YUga studio
 * @version 2015-01-12
 */
@Entity
@Table(name = "invoicing_sub_sales")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SubSales extends DataEntity {

	private static final long serialVersionUID = 1L;
	private User user;
	private int sort; // ����
	private Integer saleFormId; // 销售单编号
	private Integer goodsId; // 商品编号
	private Integer salemanId; // 销售人员编号
	private Integer customerId; // 客户编号
	private Integer goodsPrice; // 商品价格
	private Integer salesQuantity; // 销售数量
	private String saleTime; // 销售日期
	private String verfication; // 是否核销
	private Integer operatman; // 操作人员

	public Integer getSaleFormId() {
		return saleFormId;
	}

	public void setSaleFormId(Integer saleFormId) {
		this.saleFormId = saleFormId;
	}

	public Integer getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
	}

	public Integer getSalemanId() {
		return salemanId;
	}

	public void setSalemanId(Integer salemanId) {
		this.salemanId = salemanId;
	}

	public Integer getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	public Integer getGoodsPrice() {
		return goodsPrice;
	}

	public void setGoodsPrice(Integer goodsPrice) {
		this.goodsPrice = goodsPrice;
	}

	public Integer getSalesQuantity() {
		return salesQuantity;
	}

	public void setSalesQuantity(Integer salesQuantity) {
		this.salesQuantity = salesQuantity;
	}

	public String getSaleTime() {
		return saleTime;
	}

	public void setSaleTime(String saleTime) {
		this.saleTime = saleTime;
	}

	public String getVerfication() {
		return verfication;
	}

	public void setVerfication(String verfication) {
		this.verfication = verfication;
	}

	public Integer getOperatman() {
		return operatman;
	}

	public void setOperatman(Integer operatman) {
		this.operatman = operatman;
	}

	// JPA ����USER_ID�еĶ��һ��ϵ����
	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Transient
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}
}
